import request from '@/utils/request';

export async function getWrokingHoursOverViewByPage(params: any) {
  return request('/api/product/getWrokingHoursOverViewByPage', {
    method: 'POST',
    data: params,
  });
}
/**
 * @description: 分页查询工时统计的数据
 * @param {any} params
 * @return {*}
 */
export async function getWorkingHoursCountByPage(params: any) {
  return request('/api/product/getWorkingHoursCountByPage', {
    method: 'POST',
    data: params,
  });
}

export async function addWrokingHoursOverView(params: any) {
  return request('/api/product/addWrokingHoursOverView', {
    method: 'POST',
    data: params,
  });
}

export async function updateWrokingHoursOverView(params: any) {
  return request('/api/product/updateWrokingHoursOverView', {
    method: 'POST',
    data: params,
  });
}

export async function delWrokingHoursOverView(params: any) {
  return request('/api/product/delWrokingHoursOverView', {
    method: 'POST',
    data: params,
  });
}

export async function exportWrokingHoursOverView(params: any) {
  return request('/api/product/exportWrokingHoursOverView', {
    method: 'POST',
    data: params,
    responseType: 'blob',
  });
}
export default {
  getWrokingHoursOverViewByPage,
  getWorkingHoursCountByPage,
  addWrokingHoursOverView,
  updateWrokingHoursOverView,
  delWrokingHoursOverView,
  exportWrokingHoursOverView,
};
